/*
 * Copyright @ 2024 weili23
 * com.hmdp.config 10:11
 * All right reserved.
 */

package com.hmdp.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @desc: redisson配置类
 * @author: weili23
 * @createTime: 2024/3/25 10:11
 * @version: v1.0
 */
@Configuration
public class RedissonConfig {
    @Bean
    public RedissonClient redissonClient() {
        Config config = new Config();
        // 此处可以添加Redisson的配置，例如：单机模式、集群模式等
        config.useSingleServer().setAddress("redis://11.70.1.222:6379").setPassword("123321");
        return Redisson.create(config);
    }
}
